package com.ruoyi.system.api;

import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.system.api.domain.SysOperLog;
import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.system.api.domain.SysUserImel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
import com.ruoyi.system.api.model.LoginUser;

/**
 * 用户服务
 * 
 * @author ruoyi
 */
@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteUserService
{
    /**
     * 通过用户名查询用户信息
     *
     * @param username 用户名
     * @return 结果
     */
    @GetMapping(value = "/user/info/{username}")
    public R<LoginUser> getUserInfo(@PathVariable("username") String username);

    /**
     * 通过用户名查询用户信息
     *
     * @param
     * @return 结果
     */
    @GetMapping(value = "/user/list/{orgId}")
    public TableDataInfo list(@PathVariable("orgId") String orgId);

    /**
     * 绑定imel号
     */
    @PostMapping("/imel/bandImel")
    R<Boolean> bandImel(@RequestBody SysUserImel sysUserImel);

    /**
     * 查询账号是否绑定设备
     */
    @GetMapping(value = "/imel/list")
    public TableDataInfo imelList(@RequestParam("username") String username,
                                  @RequestParam("imel") String imel,@RequestParam("status") String status);
}
